package org.cybzacg.convert.matcher;


import lombok.AllArgsConstructor;
import lombok.Getter;
import org.cybzacg.convert.core.TypeConverter;
import org.cybzacg.convert.enums.ConversionPriority;

/**
 * 匹配结果
 */
@Getter
@AllArgsConstructor
public class MatchResult {
    private final TypeConverter converter;
    private final double matchScore;
    private final ConversionPriority priority;
    private final String matchReason;


    @Override
    public String toString() {
        return String.format("MatchResult{score=%.2f, priority=%s, reason='%s', converter=%s}",
                matchScore, priority, matchReason, converter.getClass().getSimpleName());
    }
}
